import { get, post, put } from '@/utils/request.js'

// 获取套餐列表
export const getVariantListApi = async params => {
    return await get({
        url: '/api/pay/list-all-variants',
        params
    })
}

// 创建任务订单
export const createTaskApi = async (data, headers = {}) => {
    return await post({
        url: '/api/watermark-removal/create',
        data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

// 获取任务列表
export const getTaskListApi = async data => {
    return await post({
        url: '/api/watermark-removal/task-list',
        data
    })
}

// 创建去水印多任务
export const createMultiTaskApi = async data => {
    return await post({
        url: '/api/watermark-removal/create-batch',
        data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

// 支付订单
export const payTaskApi = async (data, headers = {}) => {
    return await post({
        url: '/api/pay/create-checkout-session',
        data,
        headers
    })
}

//我的积分
export const getMyJifenApi = async params => {
    return await get({
        url: '/api/order/getMyPoints',
        params
    })
}

// 订单列表
export const getOrderListApi = async params => {
    return await get({
        url: '/api/order/getPayEventList',
        params
    })
}
